/* 首页样式 - 现代设计风格 */
@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css");

/* 动画定义 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.fade-in { animation: fadeIn 0.6s ease-out; }
.fade-in-delay-1 { animation: fadeIn 0.6s ease-out 0.1s both; }
.fade-in-delay-2 { animation: fadeIn 0.6s ease-out 0.2s both; }
.fade-in-delay-3 { animation: fadeIn 0.6s ease-out 0.3s both; }

/* 容器样式 */
.home-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 0;
    position: relative;
    display: flex;
    flex-direction: column;
}

.home-container.mobile {
    padding: 0;
}

/* 顶部状态栏 */
.status-bar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.status-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    position: relative;
    cursor: pointer;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.online-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #4CAF50;
    border-radius: 50%;
    border: 2px solid #fff;
}

.user-status {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.username {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.user-meta {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: #666;
}

.level {
    background: linear-gradient(45deg, #FF6B6B, #FF8E53);
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 500;
}

.points {
    color: #666;
}

.status-right {
    display: flex;
    gap: 8px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.admin-btn {
    background: linear-gradient(45deg, #FFD700, #FFA500);
    color: white;
}

.settings-btn {
    background: rgba(0, 0, 0, 0.1);
    color: #666;
}

.icon-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 快捷操作区 */
.quick-actions {
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.action-item {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    padding: 16px 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
}

.action-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.action-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.space-icon { background: linear-gradient(45deg, #667eea, #764ba2); }
.checkin-icon { background: linear-gradient(45deg, #FF6B6B, #FF8E53); }
.games-icon { background: linear-gradient(45deg, #4ECDC4, #44A08D); }
.friends-icon { background: linear-gradient(45deg, #A8E6CF, #7FCDCD); }

.action-label {
    font-size: 12px;
    font-weight: 500;
    color: #333;
    text-align: center;
}

/* 公告卡片 */
.notice-card {
    margin: 0 20px 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.notice-card.collapsed {
    padding: 12px 16px;
}

.notice-card:not(.collapsed) {
    padding: 16px;
}

.notice-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.notice-header:hover {
    background: rgba(255, 107, 107, 0.05);
    border-radius: 12px;
    margin: -4px;
    padding: 4px;
}

.notice-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.notice-icon {
    color: #FF6B6B;
    font-size: 16px;
}

.notice-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.notice-preview {
    margin-top: 4px;
}

.notice-preview-text {
    font-size: 12px;
    color: #999;
    font-style: italic;
}

.notice-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.notice-toggle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.notice-toggle:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(1.1);
}

.notice-close {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 107, 107, 0.1);
    color: #FF6B6B;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.notice-close:hover {
    background: rgba(255, 107, 107, 0.2);
    transform: scale(1.1);
}

.notice-content-wrapper {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    animation: slideDown 0.3s ease-out;
}

.notice-content {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



/* 内容区域 */
.content-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px 20px 0 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
}

.section-header {
    padding: 20px 20px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.section-title-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.section-subtitle {
    font-size: 12px;
    color: #999;
}

.refresh-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

.refresh-btn.refreshing {
    animation: pulse 1s infinite;
}

/* 动态列表 */
.posts-container {
    flex: 1;
    min-height: 0;
}

.posts-list {
    padding: 0 20px 20px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 16px;
}

.empty-title {
    font-size: 18px;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
}

.empty-subtitle {
    font-size: 14px;
    color: #999;
    margin-bottom: 24px;
}

.empty-action-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.empty-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* 动态卡片 */
.post-card {
    background: white;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #f0f0f0;
}

.author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.author-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.post-time {
    font-size: 12px;
    color: #999;
}

.post-actions {
    display: flex;
    gap: 16px;
}

.post-action-btn {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    color: #666;
}

.post-action-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.post-action-btn i.liked {
    color: #FF6B6B;
}

.action-count {
    font-size: 12px;
    color: #666;
}

.post-content {
    margin-top: 12px;
}

.post-text {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.post-modal {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #f0f0f0;
}

.modal-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.modal-user-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.modal-user-status {
    font-size: 12px;
    color: #999;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
}

.modal-body {
    padding: 20px;
}

.post-textarea {
    width: 100%;
    min-height: 120px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px;
    font-size: 14px;
    resize: none;
    outline: none;
    transition: border-color 0.3s ease;
}

.post-textarea:focus {
    border-color: #667eea;
}

.modal-tools {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.tool-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
    background: white;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.tool-btn:hover {
    background: #f8f9fa;
    border-color: #667eea;
    color: #667eea;
    transform: scale(1.1);
}

.modal-footer {
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.char-count {
    font-size: 12px;
    color: #999;
    transition: color 0.3s ease;
}

.char-count.warning {
    color: #ff9800;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-btn {
    padding: 8px 20px;
    border-radius: 20px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.modal-btn.cancel {
    background: #f5f5f5;
    color: #666;
}

.modal-btn.submit {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

.modal-btn.submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* 浮动发布按钮 */
.floating-post-btn {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(45deg, #FF6B6B, #FF8E53);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
    transition: all 0.3s ease;
    z-index: 100;
    font-size: 20px;
}

.floating-post-btn:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 12px 35px rgba(255, 107, 107, 0.4);
}

.floating-post-btn:active {
    transform: translateY(-2px) scale(1.05);
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    z-index: 100;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

/* 移动端适配 */
.mobile .status-bar {
    padding: 12px 16px;
}

.mobile .avatar {
    width: 40px;
    height: 40px;
}

.mobile .username {
    font-size: 14px;
}

.mobile .action-grid {
    gap: 12px;
}

.mobile .action-item {
    padding: 12px 6px;
}

.mobile .action-icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
}

.mobile .action-label {
    font-size: 11px;
}

 .mobile .notice-card {
     margin: 0 16px 12px;
 }
 


.mobile .content-section {
    border-radius: 16px 16px 0 0;
}

.mobile .section-header {
    padding: 16px 16px 12px;
}

.mobile .posts-list {
    padding: 0 16px 16px;
}

.mobile .post-card {
    padding: 12px;
    margin-bottom: 12px;
}

 .mobile .floating-post-btn {
     bottom: 80px;
     right: 20px;
     width: 50px;
     height: 50px;
     font-size: 18px;
 }
 
 .mobile .back-to-top {
     bottom: 20px;
     right: 20px;
     width: 45px;
     height: 45px;
 }